package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 转换输入流读写文本数据
 */
public class ISRDemo {
    public static void main(String[] args) throws IOException {
  FileInputStream fis =new FileInputStream("src/main/java/io/ISRDemo.java");
  InputStreamReader isr =new InputStreamReader(fis);
  int d ; //存储读入的字节
        //使用while循环来读取文件的所有数据a
        while ((d=isr.read())!=-1){
            System.out.print((char) d);
        }
        //给高级流关喽
        isr.close();
    }
}
